<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/common/taglib.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="${basePath}/css/register.css"/>
<link rel="stylesheet" type="text/css" href="${basePath}/css/form.css"/>
<link rel="stylesheet" type="text/css" href="${basePath}/css/resume.css"/>
<script type="text/javascript">
	var contextPath = '${basePath}'; // 上下文 js 使用
</script>
<script type="text/javascript" src="${basePath}/js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="${basePath}/js/jquery.validate-1.5.js"></script>
<script type="text/javascript" src="${basePath}/js/base.js"></script> 					<!-- 常用 js -->

<title>MSN人才网--个人会员注册</title>
<style type="text/css">
</style>
<script type="text/javascript">
</script>
</head>
<body>

<div class="mean">
  <!-- 引入侧面导航栏 -->
  <%@include file="left_menu.jsp" %>

  <div class="clearance">&nbsp;</div>
  <div class="right-content">
  


    <!--start by 个人帐号-->
      <div class="individual">
        <div class="individual_message">模板设置</div>
        <div class="individual_message_2">
        <form action="#" method="post" id="modeForm" name="modeForm">
        <input  name="modeid" type="hidden"  id="modeid" value="${mode.mbsys}"/>
        <div style="overflow:hidden;">
        
   
          <c:forEach items="${modelist}" var="obj">
     
           <div class="mode_6">
          <div class="radio_title"><input type="radio" name="mode"  value="${obj.id }"  onclick="sethide_modeid(this)"/><a href="#">${obj.name}</a></div>
          <div class="pic"><img src="${basePath}/image/${obj.image}" width="111" height="119"></div>
          </div>  
          </c:forEach>
          
          
  
        </div>
        <div class="clear"></div>
          <div class="offs"><input type="button" name="oper" id="oper" onclick="do_mode()" value="设置为默认模版" /></div>
        </form>
        </div>
      
      </div>
      <!--end by 个人帐号-->


    
  </div>
</div>
<script type="text/javascript">

function sethide_modeid(obj){
	
	if(obj.checked){
         $('#modeid').val(obj.value);
		}
	}

$(function(){


	$("input[name='mode'][value='${mode.mbsys}']").attr("checked",true); 	
	//$("input[name='mode'][value='7']").attr("checked",true); 	
	
	
});

function do_mode(){
	 var modeid="";// modeForm.mode.value;
	 modeid= $('#modeid').val();//$("input[name='mode'][checked]").val();

	 if(""==modeid){
		 alert('请选择简历模板。');
     return ;
		 }
	var url="${basePath}/user/job!doMode.do?p=1&rmd="+Math.random();;
    var params={"modeid":modeid};
	jQuery.post(url,params,function(data){
		if("true"==$.trim(data)){
			alert('设置成功！');
            return ;
	     }else{
          alert('网络异常！');
		   }

		});
	
}

</script>
</body>
</html>



